/*
 * @Description:
 *  
 * @Date: 2021-05-12 16:08:19
 */
// 关于列表查询mixin
import Tools from '@/utils/utils'

export const listQueyMixin = {
  methods: {
    // 重新处理
    clearTable() {
      this.$nextTick(() => {
        this.tableData = []
      })
    },
    // 点击查询
    clickQuery() {
      this.pagination.page = 1
      this.query()
    },
    // 分页查询
    handlePageChange() {
      this.query()
    },
    // 排序统计
    sortChange({ column, prop, order }) {
      let objMap = { ascending: 'asc', descending: 'desc' }
      this.sortColumn = {
        sort: prop,
        order: objMap[order],
      }
      this.pagination.page = 1
      this.query()
    },
  },
}
